//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Spreadsheet
{
    public class FileSharing: IOfficeXmlSerializable
    {
        #region IOfficeXmlSerializable Members

        void IOfficeXmlSerializable.ReadXml(ReadContext context)
        {
            using (ReadContext c = context.Read("fileSharing"))
            {
                ReadOnlyRecommended = c.GetOptionalBoolean("readOnlyRecommended", false);
                UserName = c.GetOptionalString("userName");
                RevervationPassword = c.GetOptionalString("reservationPassword");
            }
        }

        void IOfficeXmlSerializable.WriteXml(WriteContext context)
        {
            using (WriteContext c = context.Write("fileSharing"))
            {
                c.SetOptionalBoolean("readOnlyRecommended", ReadOnlyRecommended, false);
                c.SetOptionalString("userName", UserName);
                c.SetOptionalString("reservationPassword", RevervationPassword);
            }
        }

        #endregion

        private bool _readOnlyRecommended;

        public bool ReadOnlyRecommended
        {
            get { return _readOnlyRecommended; }
            set { _readOnlyRecommended = value; }
        }

        private string _userName;

        public string UserName
        {
            get { return _userName; }
            set { _userName = value; }
        }
        private string _reservationPassword;

        public string RevervationPassword
        {
            get { return _reservationPassword; }
            set { _reservationPassword = value; }
        }
	
	
    }
}
